var mysql      = require('mysql');
const { MultiCompiler } = require('webpack');
var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'root',
  password : '3306',
  database : 'juzao',
  multipleStatements:true
});
 
connection.connect();
module.exports=(sql)=>{
    return new Promise(next=>{
        
    connection.query(sql,function (error, results, fields) {
      if (error) throw error;
      // console.log('The solution is: ', results[0].solution);
      next(results)
    });
    // connection.end();
    })
    
}